package com.yxdj.feedback.api;

import com.yxdj.common.core.constant.SecurityConstants;
import com.yxdj.common.core.constant.ServiceNameConstants;
import com.yxdj.common.core.domain.R;
import com.yxdj.feedback.api.dto.UserReviewDto;
import com.yxdj.feedback.api.factory.RemoteUserReviewFallbackFactory;
import com.yxdj.feedback.api.vo.UserReviewVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author 韩总
 */
@FeignClient(contextId = "remoteUserReviewService", value = ServiceNameConstants.FEEDBACK_SERVICE_NAME, fallbackFactory = RemoteUserReviewFallbackFactory.class)
public interface RemoteUserReviewService {

    /**
     * 根据用户评价条件获取用户评价列表
     * @param userReviewDto
     * @param source
     * @return
     */
    @PostMapping("/review/app/getUserReviewList")
    R<UserReviewVo> getUserReviewList(@RequestBody UserReviewDto userReviewDto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
